{
  "id": "passwordless-login",
  "status": "default-inactive",
  "type": "login",
  "onboard": true,
  "title": "Passwordless Login",
  "description": "Log in without entering a password.",
  "help": "Allow users to log in without entering a password by using passkeys or emailing them a secure, instant login link instead.",
  "user-groups": {
    "group": {
      "type": "multiple",
      "title": "Enable Passwordless Login",
      "description": "Allow users to log in without entering a password by using passkeys or emailing them a secure, instant login link instead.",
      "default": "all"
    },
    "2fa_bypass_group": {
      "type": "multiple",
      "title": "Allow Two-Factor Bypass for Passwordless Login",
      "description": "Add an option to bypass two-factor authentication when using passwordless login in the WordPress user profile.",
      "conditional": {
        "active-modules": [
          "two-factor"
        ]
      }
    }
  },
  "settings": {
    "type": "object",
    "properties": {
      "methods": {
        "type": "array",
        "items": {
          "type": "string",
          "oneOf": [
            {
              "enum": [
                "magic"
              ],
              "title": "Magic Link",
              "description": "Email users a Magic Link they can use to log in with one click."
            },
            {
              "enum": [
                "webauthn"
              ],
              "title": "Passkeys",
              "description": "Users can log in with biometrics like Face ID, Touch ID, Windows Hello, or any passkey their device supports."
            }
          ]
        },
        "default": [
          "magic",
          "webauthn"
        ],
        "minItems": 1,
        "uniqueItems": true,
        "title": "Available Authentication Methods",
        "description": "Solid Security supports multiple passwordless login methods."
      },
      "availability": {
        "type": "string",
        "oneOf": [
          {
            "enum": [
              "enabled"
            ],
            "title": "Enabled by Default"
          },
          {
            "enum": [
              "disabled"
            ],
            "title": "Disabled by Default"
          }
        ],
        "default": "enabled",
        "title": "Per-User Availability",
        "description": "By default, all users selected above will be able to use passwordless login. Change to “Disabled” if you prefer to have users opt-in themselves."
      },
      "flow": {
        "type": "string",
        "oneOf": [
          {
            "type": "string",
            "enum": [
              "method-first"
            ],
            "title": "Method First",
            "description": "Choose between the traditional and passwordless login methods before entering a username or email address."
          },
          {
            "type": "string",
            "enum": [
              "username-first"
            ],
            "title": "Username First",
            "description": "Enter the username or email address first before selecting the login method."
          }
        ],
        "default": "method-first",
        "title": "Passwordless Login Flow"
      },
      "integrations": {
        "type": "object",
        "properties": {},
        "additionalProperties": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "title": "Enable"
            }
          },
          "additionalProperties": false
        },
        "default": {},
        "title": "Integrations"
      },
      "passkey_user_verification": {
        "type": "string",
        "oneOf": [
          {
            "enum": [
              "preferred"
            ],
            "title": "Preferred"
          },
          {
            "enum": [
              "required"
            ],
            "title": "Required"
          }
        ],
        "default": "preferred",
        "title": "Passkey User Verification",
        "description": "User Verification is an additional authentication step for using passkeys. For example, a PIN or biometric authentication might be required. By default, Solid Security asks your browser to determine the verification steps to apply. However, you can make this additional user verification mandatory by selecting “Required” here. User verification is not yet supported on all browsers, including Mozilla Firefox on MacOS."
      }
    },
    "uiSchema": {
      "methods": {
        "ui:widget": "checkboxes"
      },
      "availability": {
        "ui:widget": "radio"
      },
      "flow": {
        "ui:widget": "radio"
      },
      "integrations": {
        "ui:expandable": false
      },
      "passkey_user_verification": {
        "ui:widget": "radio"
      },
      "ui:sections": [
        {
          "title": "Passkeys",
          "fields": [
            "passkey_user_verification"
          ]
        }
      ]
    }
  },
  "conditional-settings": {
    "methods": {
      "active-modules": [
        "webauthn"
      ]
    },
    "2fa_bypass_group": {
      "active-modules": [
        "two-factor"
      ]
    },
    "passkey_user_verification": {
      "settings": {
        "type": "object",
        "properties": {
          "methods": {
            "type": "array",
            "enum": [
              [
                "magic",
                "webauthn"
              ],
              [
                "webauthn",
                "magic"
              ],
              [
                "webauthn"
              ]
            ]
          }
        }
      },
      "active-modules": [
        "webauthn"
      ]
    }
  },
  "removed-settings": [
    "login",
    "roles",
    "2fa_bypass",
    "2fa_bypass_roles"
  ],
  "telemetry-settings": {
    "methods": true,
    "availability": true,
    "flow": true,
    "integrations": true,
    "passkey_user_verification": true
  }
}
